<?php
$time_start = microtime();
$time_start = explode(" ", $time_start);
$time_start = $time_start[1] + $time_start[0];
$start = $time_start;
define('START_TIME', $start);

$time_end = microtime();
$time_end = explode(" ", $time_end);
$time_end = $time_end[1] + $time_end[0];
$finish = $time_end;
$totaltime = ($finish - $start);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $title_for_layout; ?></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<?=$html->css('ldsyellow')?>
<?=$html->css('generic')?>
<?=$html->css('custom')?>
<?=$html->css('cmxform')?>
<?=$javascript->link('jquery')?>
<?=$javascript->link('jquery_plugins/jquery.metadata')?>
<?=$javascript->link('jquery_plugins/jquery.validate')?>
<?=$javascript->link('cmxforms')?>
</head>
<body>
<!-- HEADER -->
<div id="wrapper">
    <table id="header" width="100%">
        <tr>
            <td width="50%" align="left"><?php echo $html->image('ldsyellow/ldsyellowpages.gif', array('align' => 'middle', 'border' => 0, 'alt' => 'LDS YELLOW PAGE')); ?></td>
            <td width="50%" align="right"><?php echo $html->image('ldsyellow/builder-ad.gif', array('align' => 'middle', 'border' => 0, 'alt' => '')); ?></td>
        </tr>
    </table>
</div>
<!-- HEADER -->
<!-- NAV -->
<div id="nav">
	<div id="navholder">
	  <div id="navleft">
        <ul>
          <li><?=$html->link('Home', '/search/index/', array('class' => 'firstlink'))?></li>
          <li><?=$html->link('Add Your Company', '/business/advertise', array('class' => 'navlink'))?></li>
          <li><?=$html->link('About Us', '/search/about/', array('class' => 'navlink'))?></li>
          <li><?=$html->link('Login', '/admin/login/', array('class' => 'navlink'))?></li>
        </ul>
      </div>
	</div>
</div>
<!-- NAV -->
<!-- Here's where I want my views to be displayed -->
  <div>
      <?php  echo $content_for_layout ?>
  </div>
<!-- Add a footer to each displayed page -->
<div align="center" id="footer">
    <br>
	<table width="99%" border="0">
	<tr>
		<td align="center">
		    <div align="center">
		      <?=$html->link('Home', '/search/index/', array('class' => 'footer'))?> |
		      <?=$html->link('Add Your Company', '/business/advertise', array('class' => 'footer'))?> |
		      <?=$html->link('About Us', '/search/about/', array('class' => 'footer'))?>
            </div><br>
			<div align="footer">
                Copyright 2007 LDS Yellow Pages. All rights reserved
            </div><br>
			<div align="center" class="smallgrey">
                <?php printf ("This page took %f seconds to load.", $totaltime); ?>
			</div>
		</td>
	</tr>
	</table>
</div>
</body>
</html>
